package com.broada.apm.dao.impl;

import java.util.List;

import com.broada.apm.dao.DomainDao;
import com.broada.apm.model.Domain;

public class MysqlDomainDao extends MysqlAbstractDao implements DomainDao {

	public static final String USER_NAMESPACE = "com.broada.apm.dao.DomainDao.";

	@Override
	public void addDomain(Domain domain) {
		getSqlSession().insert(USER_NAMESPACE + "insert", domain);
	}

	@Override
	public Domain queryDomainById(String domainId) {
		return getSqlSession().selectOne(USER_NAMESPACE + "selectById", domainId);
	}

	@Override
	public List<Domain> queryDomainsByCondition(Domain domain) {
		return getSqlSession().selectList(USER_NAMESPACE + "queryDomainsByCondition", domain);
	}

}
